from gevent.pywsgi import WSGIServer
from sensorapp import app, config

# https://dormousehole.readthedocs.io/en/latest/deploying/wsgi-standalone.html#gevent
http_server = WSGIServer((config["server"]["host"], config["server"]["port"]), app)
print(
    f'[gevent]Running on http://{config["server"]["host"]}:{config["server"]["port"]}'
)
http_server.serve_forever()
